<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
<p class="well form-search"><strong>课程：</strong><span style="color:#808080">{$le['lesson']}</span>&nbsp;<strong>场馆：</strong><span style="color:#808080">{$le['sitename']}</span>&nbsp;<strong>上课日期：</strong><span style="color:#808080">{$le['sdate']}</span>&nbsp;<strong>上课日期：</strong><span style="color:#808080">{$le['stime']}</span><a class="btn small btn-primary" href="javascript:history.go(-1);">返回</a></p>
<hr/>
	<form method='post' action='index.php?m=Lesson&a=sign_commit&lid={$lid}'>
		<h3 style="text-align:center;">成功预约信息(每节课程只可提交一次签到信息)<a class="btn small btn-primary" href='index.php?m=Lesson&a=out_excel&lid={$lid}'>导出excel</a></h3>
		<table class="table table-hover table-bordered table-list">
			<tr>
				<th>序号</th>
				<th>会员id</th>
				<th>订单id</th>
				<th>姓名</th>
				<th>所属场馆</th>
				<th>昵称</th>
				<th>电话</th>
				<th width='200px'><input class="btn small btn-primary" type='button' id='sign-all' value='全部签到' /><button id="sub" class="btn small btn-danger" type='submit'>提交签到信息</button></th>
			</tr>
			<volist name='uinfo' id='show'>
				<tr>
					<td>{$i}</td>
					<td>{$show['uid']}</td>
					<td>{$show['reid']}</td>
					<td>{$show['name']}</td>
					<td>{$show['s']}</td>
					<td>{$show['nick']}</td>
					<td>{$show['tel']}</td>
					<!--pathinfo模式下的参数传递：控制器/方法/参数/参数的值-->
					<td><input type='checkbox' name='sign[]' <if condition="$show['sign']==2">checked</if> value='{$show.reid}' /></td>
				</tr>
				<input style="display:none" name='reid[]' value='{$show.reid}' />
			</volist>
		</table>
	</form>
		<h3 style="text-align:center;">排队信息</h3>
		<table class="table table-hover table-bordered table-list">
			<tr>
				<th>序号</th>
				<th>会员id</th>
				<th>订单id</th>
				<th>姓名</th>
				<th>所属场馆</th>
				<th>昵称</th>
				<th>电话</th>
				<th  width='200px'></th>
			</tr>
			<volist name='uinfo2' id='show2'>
				<tr>
					<td>{$i}</td>
					<td>{$show2['uid']}</td>
					<td>{$show2['reid']}</td>
					<td>{$show2['name']}</td>
					<td>{$show2['s']}</td>
					<td>{$show2['nick']}</td>
					<td>{$show2['tel']}</td>
					<td></td>
				</tr>
			</volist>
		</table>

<script type="text/javascript">
	window.onload = function(){
		function getId(id){
			return document.getElementById(id);
		}
		function getName(name){
			return document.getElementsByName(name);
		}
		var all_sign = getId('sign-all');
		var chcked_demo = getName('sign[]');
		var len = chcked_demo.length;
		//alert(chcked_demo.length);
		all_sign.onclick = function(){
			for(var i=0; i< len ; i++){
				chcked_demo[i].checked=true;
			}
		};
	};
</script>
<script>
	$('#sub').click(function(){
		var a=confirm('签到信息只可提交一次，是否确认操作？');
		if(a === false) {
			return false;
		}
	});
</script>
</body>
</html>